﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using MTGenome.MTG;

namespace MTGenome.Gatherer
{
    [Serializable, Export(typeof(IDeck)), PartCreationPolicy(CreationPolicy.NonShared)]
    public sealed class Deck : IDeck
    {
        [XmlArray]
        public List<CardQuantity> Cards
        {
            get;
            set;
        }

        IEnumerable<ICardQuantity> IDeck.Cards
        {
            get { return Cards.Cast<CardQuantity>(); }
            set { Cards = value.Cast<CardQuantity>().ToList(); }
        }
    }
}
